home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 22 / Cream of the Crop 22.iso / comm / ntmler8b.zip / GMAIL.H < prev    next >
C/C++ Source or Header  |  1996-09-12  |  1KB  |  71 lines

  1. struct FormContents {
  2.     char* pName,
  3.         * pOutput,
  4.         * pReqErr,
  5.         * pRespondMsg,
  6.         * pValue;
  7.     int required,
  8.         sendto ,
  9.         respondto;
  10.     FormContents* next;
  11. };
  12.  
  13. struct HtmlVars
  14. {
  15.     char variable[33],
  16.          *value;
  17. };
  18.  
  19. class CTemplateInfo
  20. {
  21. public:
  22.     CTemplateInfo();
  23.     ~CTemplateInfo();
  24.     void SetTemplateFile(char* );
  25.     int ParseTags();
  26.     int ProcessFormInformation();
  27.     void MailInformation();
  28.  
  29. protected:
  30.     void GenerateMailToFile();
  31.     void GetFormData();
  32.     int LoadTemplateFile();
  33.     void ParseFormData();
  34.     void SeperateFormInformation(char[]);
  35.     int ParseOutput();
  36.     int ParseSucceed();
  37.     int ParseSubject();
  38.     char* GetTagData(char*, char*, int);
  39.     void PrintSucceedMsg();
  40.  
  41. private:
  42.     void PrintErrHTML(char* errstring);
  43.     char* m_pSMTPServer;
  44.     char* m_pDefaultSender;
  45.     void GetMailBodyToken(char token[], FormContents* pCursor);
  46.     void GetRespondToToken(char token[], FormContents* pCursor);
  47.     void GetSendToToken(char token[], FormContents* pCursor);
  48.     void GetRequiredToken(char token[], FormContents* pCursor);
  49.     void GetNameToken(char* token, FormContents* pCursor);
  50.     HtmlVars m_TemplateVars[50];
  51.     char* m_pTemplateName,
  52.         * m_pSendTo,
  53.         * m_pSucceedMsg,
  54.           m_pRawData[10000],
  55.           m_pMailInfoTo[6000],
  56.           * m_pSucceed,
  57.         * m_pSubject, 
  58.         * m_pMailFrom,
  59.           m_pRespondMsg[3000],
  60.         * m_pRawFormData,
  61.         * m_pErrTemplate;
  62.     CCGI cgiData;
  63.     FormContents* m_pFormInformation;
  64.  
  65.  
  66. };
  67.  
  68. char* CreateTempFile(const char*);
  69. void HdrErr(char*, char*);
  70.  
  71.